﻿namespace Sgr.AuditLogs.Model
{
    /// <summary>
    /// 审计日志每周情况汇总视图模型
    /// </summary>
    public class AuditOverviewPreWeek
    {
        /// <summary>
        /// 近一周每天操作总数
        /// </summary>
        public int[] TotalOperationsByWeek { get; set; } = Array.Empty<int>();

        /// <summary>
        /// 当前周操作总数
        /// </summary>
        public int TotalOperationsCurrentWeek { get; set; }

        /// <summary>
        /// 上一周操作总数
        /// </summary>
        public int TotalOperationsPreviousWeek { get; set; }

        /// <summary>
        /// 当前周操作人数
        /// </summary>
        public int UniqueUsersCurrentWeek { get; set; }

        /// <summary>
        /// 上一周操作人数
        /// </summary>
        public int UniqueUsersPreviousWeek { get; set; }

        /// <summary>
        /// 本周操作成功率（百分比），如98.5表示98.5%
        /// </summary>
        public double CurrentWeekSuccessRate { get; set; }

        /// <summary>
        /// 前一周操作成功率（百分比），如98.5表示98.5%
        /// </summary>
        public double PreviousWeekSuccessRate { get; set; }

        /// <summary>
        /// 本周操作异常数
        /// </summary>
        public int CurrentWeekErrorOperations { get; set; }

        /// <summary>
        /// 前一周操作异常数
        /// </summary>
        public int PreviousWeekErrorOperations { get; set; }
    }
}